//
//  YWPatrollineRecord.h
//  maintain
//
//  Created by Kyo on 16/2/22.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YWHandler;
@class YWPatrolLine;
@class YWKeepWatchMission;


typedef NS_ENUM(NSUInteger, YWPatrollineRecordResult) {
    YWPatrollineRecordResultUnfinishAndNormal = 0, //未完成
    YWPatrollineRecordResultUnfinishAndTrouble = 1, //未完成（有故障）
    YWPatrollineRecordResultFinishAndTrouble = 2, //已完成（有故障）
    YWPatrollineRecordResultFinishAndNormal = 3,//已完成
    YWPatrollineRecordResultSystem = 4,//系统生成的，没有执行人
};
@interface YWPatrollineRecord : NSObject

/**巡更线路ID*/
@property (nonatomic, assign) NSInteger patrolLineId;
/**记录标识*/
@property (nonatomic, copy) NSString* uniqueTag;
/**记录编号*/
@property (nonatomic, copy) NSString *recordSequence;
/**开始时间*/
@property (nonatomic, assign) NSTimeInterval startTime;
/**结束时间*/
@property (nonatomic, assign) NSTimeInterval endTime;
/**完成数*/
@property (nonatomic, assign) NSInteger count;
/**巡更任务id*/
@property (nonatomic, assign) NSInteger keepWatchMissionId;
/**故障还是正常*/
@property (nonatomic, assign) YWPatrollineRecordResult result;
/**执行人id串*/
@property (nonatomic, copy) NSString *executorIds;

////解析数据需要用到的字段
@property (nonatomic, strong) YWPatrolLine *patrolLine;
/**巡更点的记录，YWPatrolPointRecord对象*/
@property (nonatomic, strong) NSArray* details;
/**服务器返回的记录ID，用于下拉请求分页（暂时没用到）*/
@property (nonatomic, assign) NSInteger recordId;

/**界面使用，下面的字段用于解析*/
@property (nonatomic, strong) YWKeepWatchMission *keepWatchMission;
/**楼盘ID*/
@property (nonatomic, copy) NSString* buildingId;
/**任务创建人*/
@property (nonatomic, strong) YWHandler *missionCreator;
/**巡更任务执行人集合*/
@property (nonatomic, strong) NSArray *executors;
/**任务编号*/
@property (nonatomic, copy) NSString* missionSequence;
@end

@interface YWKeepWatchMissionInfoJson : NSObject
/**任务的最新一条的巡更记录*/
@property (nonatomic, strong) YWPatrollineRecord *latestRecord;
/**评论*/
@property (nonatomic, strong) NSArray* replies;
@end
